import numpy as np
import pandas as pd
import numpy as np
import cv2

img = np.load('test/1.npy')
cv2.imshow('1.npy', mat=img)
cv2.waitKey(0)
cv2.destroyAllWindows()
# df1 = pd.read_csv('EfficientNetB3_model_predictions.csv')
# df2 = pd.read_csv('EfficientNetB3_model_transer_predictions.csv')
#
# # 检查行是否相等
# equal_rows = (df1 == df2).all(axis=1)
#
# # 统计相等的行数
# equal_rows_count = equal_rows.sum()
# print(f'Number of equal rows: {equal_rows_count}')
#
# df = pd.read_csv('cos_res.csv')
# df.columns = ['cos', 'npy', 'label', 'name']
# df_sorted = df.sort_values(by=['npy', 'cos'], ascending=[True, False])
# # Group by 'npy' and take the top three rows for each group
# result = df_sorted.groupby('npy').head(3)
# result = result.rename(columns={'npy': 'uuid'})
# result['uuid'] = result['uuid'].str.replace('.npy', '')
# result['uuid'] = result['uuid'].astype(int)
# result = result.sort_values(by=['uuid'], ascending=[True])
# result[['uuid', 'label', 'cos', 'name']].to_csv('cos_ll.csv', index=None)
